Standards such as MPEG (Moving Picture Experts Group) and H.264 have been known as standards for video compression coding. Image processing apparatuses that perform such compression coding perform intra prediction and inter prediction. According to the intra prediction, a motion search is performed so as to detect motion vectors of macroblocks (MBs) into which a screen to be encoded (referred to as “currently processed image”) is divided. The motion search is a process to search out a block similar to a macroblock that is a target of processing from a reference image that is temporally previous or subsequent to the currently processed image. In the motion search, a search range may be set using motion vectors in an image temporally different from the currently processed image. (See, for example, Japanese Laid-Open Patent Publication Nos. 2000-308062 and 2002-335529.)